package com.ahsjdy.st.stdao.mapper;

import com.ahsjdy.st.stdao.entity.Commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommodityMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Commodity record);

    int insertSelective(Commodity record);

    Commodity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Commodity record);

    int updateByPrimaryKey(Commodity record);

    List<Commodity> listCommodity(@Param("merchantId") Integer merchantId, @Param("status") Integer status);

    int updateStatus(@Param("commoId") Integer commoId,
                     @Param("newStatus") Integer newStatus,
                     @Param("oldStatus") Integer oldStatus);
}